/ Assembly List / LJCDataAccessConfig / DataConfig / GetConnectionStringFromText

Namespace - LJCDataAccessConfig


Parameters
templateText - The connection template text value.

Returns

The connection string.

Syntax

C#
public String GetConnectionStringFromText(String templateText)

Creates the populated connection string from the template text.

Example

C#
// See the DataConfig setup code on the DataConfig class page.

// Creates the populated connection string from the template text.
private static void GetConnectionStringFromText(DataConfig dataConfig)
{
    ConnectionTemplates templates = new ConnectionTemplates();
    templates.LJCLoadData();
    var connTypeName = dataConfig.ConnectionTypeName;
    ConnectionTemplate template = templates.LJCGetByName(connTypeName);

    string connString;
    connString = dataConfig.GetConnectionStringFromText(template.Template);
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.